cc.Class({
    extends: cc.Component,

    properties: {
        destroyOnLoad: {
            default: false,
            tooltip: '是否一加载就销毁，适用于设计阶段辅助元素',
        },
        activibilityOnLoad: {
            default: false,
            tooltip: '加载后处于活动还是非活动状态',
        },
        visibleOnLoad:{
            default: false,
            tooltip: '加载后是否可见'
        }
    },

    // LIFE-CYCLE CALLBACKS:

    onLoad() {
        //
        if (this.destroyOnLoad === true) {
            this.node.destroy();
            return;
        }
        //
        this.node.active = this.activibilityOnLoad;
        //
        this.node.opacity = this.visibleOnLoad?this.node.opacity:0;
    },
});
